package java3_24;

import java.util.Arrays;
import java.util.Scanner;

/**
 * 5：定义一个字符串，输出他对应的字节和字符。
 */
public class StringHomework5 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个字符串:");
        String x = scanner.next();
        char [] y = x.toCharArray();
        byte [] z = x.getBytes();
        System.out.println("字节数组:"+Arrays.toString(z));
        System.out.println("字符数组:"+Arrays.toString(y));
    }
}
